package online.heycm.rbac.service.user;

import online.heycm.platform.common.entity.result.Optional;
import online.heycm.platform.common.entity.result.PageResult;
import online.heycm.rbac.common.entity.Session;
import online.heycm.rbac.param.user.ConsoleLoginReq;
import online.heycm.rbac.param.user.ConsoleResourceRes;
import online.heycm.rbac.param.user.UserAddReq;
import online.heycm.rbac.param.user.UserDetailRes;
import online.heycm.rbac.param.user.UserEditReq;
import online.heycm.rbac.param.user.UserPageReq;
import online.heycm.rbac.param.user.UserPageRes;

import java.util.List;

/**
 * @author hey
 * @version 1.0
 * @date 2024/1/12 17:09
 */
public interface UserService {

    Optional logout(Session session);

    Optional<Session> consoleUserLogin(ConsoleLoginReq req);

    Optional<List<ConsoleResourceRes>> consoleUserResource(Session session);

    Optional<PageResult<UserPageRes>> pageUser(UserPageReq req);

    Optional<UserDetailRes> getUserDetail(int userId);

    Optional addUser(UserAddReq req);

    Optional editUser(UserEditReq req);
}
